<div class="bjui-pageHeader">
  <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('index')}" method="post">
    <div class="bjui-searchBar">
      <div class="bjui-searchBar">
        <label>搜索：</label>
        <div role="group" class="btn-group">
          <select name="key" data-toggle="selectpicker">
            <option value="">－关键字类型－</option>
            <option value="order_sn" <?php echo I("key")=="order_sn" ? "selected='true'" : "";?>>－网店订单号－</option>
            <option value="order_no" <?php echo I("key")=="order_no" ? "selected='true'" : "";?>>－商品货号－</option>
            <option value="user_name" <?php echo I("key")=="user_name" ? "selected='true'" : "";?>>－姓名－</option>
			<option value="mobile_phone" <?php echo I("key")=="mobile_phone" ? "selected='true'" : "";?>>－手机－</option>
            <option value="home_phone" <?php echo I("key")=="home_phone" ? "selected='true'" : "";?>>－电话－</option>
			<option value="address" <?php echo I("key")=="address" ? "selected='true'" : "";?>>－地址－</option>
            <option value="courie_number" <?php echo I("key")=="courie_number" ? "selected='true'" : "";?>>－快递单号－</option>
          </select>
          <input type="text" name="value" class="form-control" size="15" value="{:I('value')}">
        </div>
		&nbsp;
		<div role="group" class="btn-group">
			<select name="bank_id" data-toggle="selectpicker">
				<option value="">请选择网店</option>
				<?php foreach($bankList as $bank):?>
				<option value="{$bank.id}" <?php echo I("bank_id")==$bank['id'] ? "selected='true'" : "";?>>{$bank.name}</option>
				<?php endforeach;?>
			</select>
		</div>
		&nbsp;
		<label>下单时间：</label><input type="text" data-toggle='datepicker' value="{$start_time}" name="start_time" class="form-control" size="15"  data-rule="required" />-<input type="text" data-toggle='datepicker' value="{$end_time}" name="end_time" class="form-control" size="15"  data-rule="required"/>
		
        <button type="submit" class="btn-default" data-icon="search">查询</button>
          <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true)" data-icon="undo">清空查询</a> &nbsp; 
        <div class="pull-right">
		<span><a href="{:U('import')}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="200" data-id="dialog-normal" data-mask="true" data-title="导入银行清单">导入银行清单</a></span>
		<span><a href="{:U('outxls')}" class="btn btn-blue" data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="arrow-up">导出</a></span>
        <div class="btn-group">
          <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">批量生成出库单<span class="caret"></span></button>
          <ul class="dropdown-menu right" role="menu">
		    <li><a href="{:U('outxls')}" data-toggle="doexport" data-confirm-msg="确定要导出信息吗？">导出<span style="color: green;">全部</span></a></li>
		  	<li><a href="{:U('createOutbound')}" data-toggle="doajaxchecked" data-confirm-msg="确定要生成出库单吗？" data-idname="orderIds" data-group="ids">生成出库单</a></li>
          </ul>
        </div>
      </div>
      </div>
    </div>
  </form>
</div>
<div class="bjui-pageContent tableContent">
  <table class="table table-bordered table-hover table-striped table-top">
    <thead>
      <tr>
        <!-- 选择   订单号    网店单号    商品数量  订单状态   提交时间      操作  -->
        <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
        <th data-order-field="order_no" align="center">系统订单号<br />出库单号</th>
        <th data-order-field="order_sn" align="center">网店单号</th>
        <th data-order-field="order_amount" align="center">订单金额</th>
        <th data-order-field="order_status" align="center">订单状态</th>
        <th data-order-field="status_time" align="center">提交时间</th>
        <th align="center">操作</th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($list as $arr):?>
      <tr>
        <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.order_id}"></td>
        <!-- 订单号 -->
        <td align="center"><a  data-toggle="navtab" data-options="{id:'Order{$arr['order_id']}', url:'{:U('ShippingManage/detailsShipping?orderId='.$arr['order_id'])}', reloadWarn:'已打开业务页面，确认将重新载入?', title:'{$arr.order_sn}-订单详细'}">{$arr.order_no}</a><br/>{$arr.outbound_sn}<br/>({$arr.user_name})</td>
        <!-- 网店单号 -->
        <td align="center">{$arr.order_sn}</td>
        <!-- 商品数量 -->
        <td align="center">{$arr.order_amount}</td>
        <!-- 订单状态 -->
        <td align="center">{$arr.order_status}</td>
        <!-- 提交时间 -->
        <td align="center">{:date('Y-m-d H:i:s', $arr['add_time'])}</td>
        <!-- 操作 -->
        <td>
			<a href="{:U('cancelorder?orderId='.$arr['order_id'])}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定取消这条订单吗？">取消</a> 
		</td>
      </tr>
      <?php endforeach;?>
    </tbody>
  </table>
</div>
<div class="bjui-pageFooter">
  <div class="pages"> <span>每页&nbsp;</span>
    <div class="selectPagesize">
      <select data-toggle="selectpicker" data-toggle-change="changepagesize">
        <option value="{$pageSize}">{$pageSize}</option>
        <option value="{$pageSize*3}">{$pageSize*3}</option>
        <option value="{$pageSize*6}">{$pageSize*6}</option>
        <option value="{$pageSize*12}">{$pageSize*12}</option>
        <option value="{$pageSize*15}">{$pageSize*15}</option>
      </select>
    </div>
    <span>&nbsp;条，共 {$total} 条</span> </div>
  <div class="pagination-box" data-toggle="pagination" data-total="{$total}" data-page-size="{$pageSize}"
         data-page-current="{$pageCurrent}"></div>
</div>
